<template>
  <div class="container">
    <TopCell text="我的收藏" @click="$router.push('/user')" />
    <newList v-for="item in list" :key="item.id" :item="item" />
  </div>
</template> 

<script>
import newList from "../components/newList";
import TopCell from "../components/TopCell";
export default {
  components: {
    TopCell,
    newList,
  },
  data() {
    return {
      list: [],
    };
  },
  created() {
    this.$axios({
      url: "/user_star",
      method: "get",
      headers: {
        Authorization: localStorage.getItem("token"),
      },
    }).then((res) => {
      console.log(res);
      this.list = res.data.data;
    });
  },
};
</script>
<style lang="less" scoped>
</style>